<?php

namespace app\models\member;

use Yii;

/**
 * This is the model class for table "member".
 *
 * @property integer $id
 * @property string $open_id
 * @property string $nickname
 * @property string $member_name
 * @property string $member_phone
 * @property integer $sex
 * @property string $city
 * @property string $province
 * @property string $country
 * @property string $avatar
 * @property string $ip
 * @property string $unionid
 * @property integer $yaojiang_count
 * @property integer $lastlogin_time
 * @property integer $create_time
 */
class Member extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'member';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['sex', 'yaojiang_count', 'lastlogin_time', 'create_time'], 'integer'],
            [['open_id', 'avatar'], 'string', 'max' => 500],
            [['nickname'], 'string', 'max' => 800],
            [['member_name', 'ip'], 'string', 'max' => 30],
            [['member_phone'], 'string', 'max' => 11],
            [['city', 'province', 'country'], 'string', 'max' => 40],
            [['unionid'], 'string', 'max' => 48],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'open_id' => 'Open ID',
            'nickname' => 'Nickname',
            'member_name' => 'Member Name',
            'member_phone' => 'Member Phone',
            'sex' => 'Sex',
            'city' => 'City',
            'province' => 'Province',
            'country' => 'Country',
            'avatar' => 'Avatar',
            'ip' => 'Ip',
            'unionid' => 'Unionid',
            'yaojiang_count' => 'Yaojiang Count',
            'lastlogin_time' => 'Lastlogin Time',
            'create_time' => 'Create Time',
        ];
    }
}
